package string;

/**
 * String replaceall(Stringregex,String s):
 * 将当前字符串中正则表达式（regex）的部分给替换为指定字符串
 */
public class ReplaceAllDemo {
    public static void main(String[] args) {
        String line = "zhangwanting520";
        //将数字部分替换为love
        line = line.replaceAll("[0-9]+", "love");
        System.out.println(line);

    }
}
